<?php
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.alert form').submit(function(){
	$.fn.yiiGridView.update('pidum-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<div class="container">

<!-- Info Blokcs -->
<div class="row">
    <!-- Welcome Block -->
    <div class="col-md-7">
       
    <div class="col-md-11" style="margin-top:25px;">
                <span class="spanjudulberita">
                   <h4><strong><?php echo "INFO PERKARA PIDANA UMUM"; ?></strong></h4>
                </span>
                <br />
                <br />
				<br />
                <span class="spandetailberita" style="font-size:10px;">
                    <?php
        $this->widget('bootstrap.widgets.TbGridView', array(
            'id' => 'pidum-grid',
            'dataProvider' => $model->searchIndex(),
            'type' => 'striped bordered condensed',
            'template' => '{items}{pager}',
            //'filter'=>$modelKecamatan,
            'columns' => array(
                array(
                    //'name' => 'nomor_perkara',
                    'header' => 'NO. PERKARA',
					'value' => 'CHtml::link($data->nomor_perkara,array(\'perkaraPidum/Detil\',\'id\'=>$data->id,))',
					'type' => 'html',
                    'htmlOptions' => array(
                        'style' => 'width:20%;font-size:11px',
                    ),
                ),
				//'value'=>'CHtml::link($data->title,array("post/view","id"=>$data->id))'), 
				array(
                    'name' => 'wilayah',
                    'header' => 'WILAYAH HUKUM',
                    'htmlOptions' => array(
                        'style' => 'width:30%;font-size:11px',
                    ),
                ),
                array(
                    //'name' => 'terdakwa',
                    'header' => 'TERSANGKA/TERDAKWA',
					'value' => '$data->terdakwa',
					'type' => 'html',
                    'htmlOptions' => array(
                        'style' => 'width:30%;font-size:11px',
                    ),
                ),
                array(
                    //'name' => 'wilayah',
                    'header' => 'STATUS',
					'value' => '$data->status',
					'type' => 'html',
                    'htmlOptions' => array(
                        'style' => 'width:20%;font-size:11px',
                    ),
                ),
            ),
            'htmlOptions' => array('style' => 'width:110%'),
        ));
        ?>
                </span>
            </div>
    </div>
    <!--/col-md-8-->

    <!-- column berita -->
    <div class="col-md-4">
        
       <div class="judul-index">
                  <h3>
                    <img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_48.jpg' border='0'  />
                    Berita
                  </h3>
        </div>

        <div class="div-indexpengumuman">
            <div class="div-indexpengumuman2">
            <?php
            $berita = Posting::model()->findAll(array("limit"=>5));

            foreach($berita as $row){
            ?>
            <div class="div-indexpengumuman3">
                <span class="tglpengumuman">
                    
                    <?php echo date('d-m-Y',strtotime($row->created_time)) ?>
                    
                </span>
                <br />
                
                <span class="judulpengumuman">
                    <a href="<?php echo Yii::app()->createUrl('posting/view',array('id'=>$row->id)); ?>" >
                    <?php echo $row->judul ?>
                    </a>
                </span>

            </div>    

            <hr class="hrpengumuman" />

            <?php
            }
            ?>

            <div class="div-buttonpengumuman" style="margin-left:-150px;margin-top:10px;">
			<a href="<?php echo Yii::app()->createUrl('posting/list'); ?>" >
                <img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_53.jpg' border='0'  />
			</a>	
            </div>

            </div>

        </div>
      
        <br />

        <div class="judul-index">
                  <h3>
                    <img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_51.jpg' border='0'  />
                    Pengumuman
                  </h3>
        </div>

         <div class="div-indexpengumuman">
            <div class="div-indexpengumuman2">
            
            <?php
            $pengumuman = Pengumuman::model()->findAll(array("limit"=>5));

            foreach($pengumuman as $rowPengumuman){
            ?>
            <div class="div-indexpengumuman3">
                <span class="tglpengumuman">
                    <a href="<?php echo Yii::app()->createUrl('pengumuman/view',array('id'=>$rowPengumuman->id)); ?>" >
                    <?php echo $rowPengumuman->judul_pengumuman; ?>
                    </a>
                </span>
                <br />
                <span class="judulpengumuman"><?php echo $rowPengumuman->isi; ?></span>
            </div>    

            <hr class="hrpengumuman" />

            <?php
            }
            ?>

            <div class="div-buttonpengumuman" style="margin-left:-150px;margin-top:10px;">
                <a href="<?php echo Yii::app()->createUrl('pengumuman/list'); ?>" >
				<img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_53.jpg' border='0'  />
				</a>
            </div>

            </div>

        </div>

        

    </div>
    <!--/col-md-4-->
</div>
<!--/row-->
<!-- End Info Blokcs -->


<!-- End Our Clients -->
</div>
<!-- End Content Part -->